package com.mlming.springboot.enums;

// 一些响应状态的枚举
public enum ResponseEnum {
    ERROR(500,"服务端异常"),
    SUCCESS(0,"成功"),
    SCHOOL_NUM_ERR(1,"非官方学号,请重输"),
    USERNAME_LENGTH_ERR(1,"应为2~5位"),
    PASSWORD_LENGTH_ERR(1,"应为5~10位"),
    PASSWORD__ERR(1,"小写字母与数字组成"),
    SCHOOL_NUM_EXISTS(1,"学号已存在"),
    USERNAME_EXISTS(1,"用户名已存在"),
    USERNAME_NOT_EXISTS(2,"用户信息不存在,请先注册"),
    USERNAME_OR_PASSWORD_ERROR(1,"用户名或密码错误"),
    ;
    Integer code;
    String desc;

    ResponseEnum(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public Integer getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }
}
